using Identity.Domain.Aggregates;
using Identity.Infrastructure.Entities;

namespace Identity.Infrastructure.Persistence.IdentityService.Mappers;

public  class UserMapper
{

    public static ApplicationUser ToApplicationUser(UserAggregate userAggregate)
    {
        
        return new ApplicationUser { Id = userAggregate.Id, UserName = userAggregate.UserName, Email = userAggregate.Email,Roles=userAggregate._roles.ToList() };
    }
}